<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Message extends Model {
    protected $fillable = ['guest_name', 'guest_email', 'guest_phone', 'content', 'parent_id', 'user_id', 'status'];

    public function children() {
        return $this->hasMany(Message::class, 'parent_id');
    }
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
